for (int i = 100; i <= 999; i++)
        for (int j = 100; j <= 999; j++)
            for (int k = 100; k <= 999; k++)
            {
                if (j == 2 * i && k == 3 * i && fun(i, j, k) == 1)
                    printf("%d %d %d\n", i, j, k);
            }